import { getData } from "@/api/index";
import { ref } from 'vue'
interface DataType {
    id: string;
    isable: string;
}

export default function useUserRepositories(formState: any) {
    const repositories = ref<DataType[]>([]);
    const total = ref<number>(0);
    const getUserRepositories = async () => {
        let data: any = await getData(formState);
        repositories.value = data.rows;
        total.value = data.total;
        return repositories.value;
    }
    return {
        total,
        repositories,
        getUserRepositories
    }
}